import {Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import {PagedList} from '../entity/paged-list';
import {InvokeLog} from '../entity/invoke-log';
import {InvokeLogQuery} from '../entity/invoke-log-query';
import {TpHttpService} from './tp-http.service';
import {BaseResponse} from '../entity/base-response';

@Injectable({
    providedIn: 'root'
})
export class InvokeLogService {

    constructor(private tpHttpService: TpHttpService) {
    }

    /**
     * 调用日志查询
     * @param {InvokeLogQuery} query
     * @returns {Observable<BaseResponse<PagedList<InvokeLog[]>>>}
     */
    list(query: InvokeLogQuery): Observable<BaseResponse<PagedList<InvokeLog>>> {
        return this.tpHttpService.post('/api/invoke/log/list', query);
    }
}
